package com.itcoon.transform4j.demo.web.vo;

import com.itcoon.transform4j.demo.domain.Book;
import com.itcoon.transform.base.annotation.AssembleModel;
import com.itcoon.transform.base.annotation.AssembleModelProperty;
import lombok.Data;

@Data
@AssembleModel(from = Book.class)
public class BookVCO {

    @AssembleModelProperty
    private String name;

    @AssembleModelProperty
    private Long id;

    @AssembleModelProperty(mapValue = "author.name")
    private String authorName;

    @AssembleModelProperty(mapValue = "author.company.name")
    private String authorCompanyName;

    @AssembleModelProperty(mapValue = "author.company.location")
    private String authorCompanyLocation;
}
